import React, { Component } from 'react'
import './componthead.less'
export default class ComponentHead extends Component{
    goback=()=>{
        this.props.history.goBack();
        console.log(this.props.history)
        //返回方法：
        // 1.引入withroute组件
        // 2.携带参数
        // 3.高阶组件
    }
    render(){
        return(
            <div className='city'>
                 <div className='city-head'>
                    <i 
                        className='small iconfont icon-fanhui'
                        onClick={this.goback}
                    ></i>
                    <span>{this.props.title}</span>
                 </div>
             </div>
        )
    }
}